package po.message;

import java.time.LocalDateTime;
import java.util.Objects;

/**
 * 新闻类
 * @author gaoronghai
 *
 */
public class News {
	private int newsId;
	private String title;
	private String content;
	private LocalDateTime newsTime; 
	private boolean deleteFlag;
	public News() {
		super();
	}
	public News(int newsId, String title, String content, LocalDateTime newsTime, boolean deleteFlag) {
		super();
		this.newsId = newsId;
		this.title = title;
		this.content = content;
		this.newsTime = newsTime;
		this.deleteFlag = deleteFlag;
	}
	public int getNewsId() {
		return newsId;
	}
	public void setNewsId(int newsId) {
		this.newsId = newsId;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public LocalDateTime getNewsTime() {
		return newsTime;
	}
	public void setNewsTime(LocalDateTime newsTime) {
		this.newsTime = newsTime;
	}
	public boolean isDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(boolean deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	@Override
	public String toString() {
		return "News [newsId=" + newsId + ", title=" + title + ", content=" + content + ", newsTime=" + newsTime
				+ ", deleteFlag=" + deleteFlag + "]";
	}
	@Override
	public int hashCode() {
		return Objects.hash(newsId);
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		News other = (News) obj;
		return newsId == other.newsId;
	}
	
}
